package com.cloud.wms.ui.inside.entity;

import android.os.Parcel;
import android.os.Parcelable;

import com.cloud.wms.ui.main.entity.BatchEntity;
import com.cloud.wms.ui.sort.BatchActivity;

import java.util.ArrayList;

/**
 * @Author:Chen
 * @Date: 2021-03-19 10:37
 * @Description:
 */
public class RevertEntity implements Parcelable {
    private int totalAmount;
    private ArrayList<RevertBatchEntity> batchList;

    public int getTotalAmount() {
        return totalAmount;
    }

    public void setTotalAmount(int totalAmount) {
        this.totalAmount = totalAmount;
    }

    public ArrayList<RevertBatchEntity> getBatchList() {
        return batchList;
    }

    public void setBatchList(ArrayList<RevertBatchEntity> batchList) {
        this.batchList = batchList;
    }

    public RevertEntity() {
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeInt(this.totalAmount);
        dest.writeTypedList(this.batchList);
    }

    protected RevertEntity(Parcel in) {
        this.totalAmount = in.readInt();
        this.batchList = in.createTypedArrayList(RevertBatchEntity.CREATOR);
    }

    public static final Creator<RevertEntity> CREATOR = new Creator<RevertEntity>() {
        @Override
        public RevertEntity createFromParcel(Parcel source) {
            return new RevertEntity(source);
        }

        @Override
        public RevertEntity[] newArray(int size) {
            return new RevertEntity[size];
        }
    };
}
